ACTOR SFortMachinegun : Chaingun
{
  Weapon.KickBack 25
  Weapon.SelectionOrder 700
  AttackSound "weapons/machinegun"
  Decal BulletChip
  Tag "Machinegun"
  DamageType "Bullet"
  Obituary "%o was machinegunned by %k."
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Ready:
    MCHG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
	Loop
  Deselect:
    MCHG A 0 A_Lower
    Loop
  Select:
    MCHG A 1 A_Raise
    Loop
  Fire:
    TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
    TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	TNT1 A 0 A_GunFlash
	MCHG B 2 Bright A_FireBullets(2.1,1.75,-1,15,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
	MCHG C 2 Bright
    MCHG A 0 A_ReFire//("Fire2")
    Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_7)
	Goto Fire+2
/*  Fire2:
    TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad2")
	TNT1 A 0 A_GunFlash
	MCHG B 2 Bright A_FireBullets(2.8,1.75,-1,15,"SFortBulletPuff",FBF_NORANDOM|FBF_USEAMMO)
	MCHG C 2 Bright
    MCHG A 0 A_ReFire("Fire2")
    Goto Ready
  Quad2:
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_7)
	Goto Fire2+1*/
  Flash:
    TNT1 A 3 A_Light1
    Goto LightDone
  }
}

ACTOR SFortNailgun : Weapon
{
  Weapon.SelectionOrder 700
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "Clip"
  Inventory.PickupMessage "You got the nailgun!"
  Obituary "%o was nailed by %k."
  Tag "Nailgun"
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Spawn:
    NLMG E -1 Bright
    Loop
  Select:
    NLMG A 1 A_Raise
    Loop
  Deselect:
    TNT1 A 0 A_Lower
    Loop
  Ready:
    NLMG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
    Loop
  Fire:
  FireNormal:
    TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
    TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad1")
    TNT1 A 0 A_GunFlash
    TNT1 A 0 A_PlaySound("weapons/nailgf",CHAN_WEAPON)
    NLMG B 2 A_FireCustomMissile("Nail", 0, 1, -5)
    NLMG A 2
    TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad2")
    TNT1 A 0 A_GunFlash("Flash2")
    TNT1 A 0 A_PlaySound("weapons/nailgf",CHAN_WEAPON)
    NLMG C 2 A_FireCustomMissile("Nail", 0, 1, 5)
    NLMG A 2
    TNT1 A 0 A_Refire
    Goto Ready
  Quad1:
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_7)
    Goto FireNormal+2
  Quad2:
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_7)
    Goto FireNormal+7
  Flash:
    NLMG B 2 Bright A_Light1
    NLMG A 2 Bright A_Light1
  Flash2:
    NLMG C 2 Bright A_Light2
    NLMG A 2 Bright A_Light2
    Goto LightDone
    }
}


ACTOR Nail : FastProjectile
{
  ProjectileKickBack 1
  Radius 1
  Height 1
  Scale 0.6
  Speed 75
  Damage (15)
  DamageType "Nail"
  +BloodSplatter
  SeeSound ""
  DeathSound "misc/ricochet"
  Obituary "%o was nailed by %k."
  Decal Nail
  States
  {
  Spawn:
    NLPJ A 1 Bright
    Loop
  Crash:
  Death:
    TNT1 A 1
	TNT1 A 1 A_SpawnItemEx("SFortBulletPuff",0,0,0,0,0,1)
    Stop
  XDeath:
    TNT1 A 0
    TNT1 A 1 A_Playsound("weapons/nailhit")
    Stop
  }
}

ACTOR NailSlower : PowerSpeed
{
  Speed 0.65
  Powerup.Duration 35
  +POWERSPEED.NOTRAIL
}

ACTOR SFortNailPistol : Weapon
{
  Weapon.SelectionOrder 700
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "Clip"
  Inventory.PickupMessage "You got the nail pistol!"
  Obituary "%o was nailed by %k."
  Tag "Nail Pistol"
  +WEAPON.NOAUTOAIM
  +WEAPON.NOLMS
  +WEAPON.ALLOW_WITH_RESPAWN_INVUL
  States
  {
  Select:
	TNT1 A 0 A_Raise
    NPIS A 1 A_Raise
    Loop
  Deselect:
    TNT1 A 0 A_Lower
    Loop
  Ready:
    NPIS A 1 A_WeaponReady(WRF_ALLOWRELOAD)
    Loop
  Fire:
  FireNormal:
    TNT1 A 0 A_TakeInventory("PowerInvulnerable",1)
    TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
    TNT1 A 0 A_GunFlash
    TNT1 A 0 A_PlaySound("weapons/nailpst",CHAN_WEAPON)
    NPIS B 1 Bright A_FireCustomMissile("Nail",frandom(-2,2),1,0,0,0,frandom(-1.5,1.5))
    NPIS C 1 A_JumpIfInventory("RuneDoubleFiringSpeed",1,1)
    NPIS D 1
	NPIS DEEEBBB 1 A_Refire
	Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_7)
    Goto FireNormal+2
  Flash:
    NPIF A 1 Bright A_Light1
	TNT1 A 3 Bright A_Light1
    Goto LightDone
  }
}
/*
ACTOR SmallNail : Nail
{
  Scale 0.5
  Damage (15)
}*/